$(document).ready(function () {
    $('form').submit(function (e) {
    	login();
		e.preventDefault();
    });
});

function login() 
{
//	$.remoteCall('TEST_Demo','demo',['f::ff','iiiii::iiiii'],onLogin);
//	function callBack(){
//		var result = this.result;
//		alert(result);
//	}
	var login = $("#login").val(); 
	var passw = $("#passw").val();
	$.remoteCall('ADMIN_user','login',[login,passw],onLogin);
}
function onLogin()
{
	var result = this.result;
	if( result.status )
	{
		document.location.reload(true);
	}
	else 
	{
		$("#msg").html('<div class="alert alert-error"><button type="button" class="close" data-dismiss="alert">&times;</button><strong>Error!</strong> vrong login or password</div>');
	}
}
